package com.humanresource.utils;

import java.util.List;

import com.humanresource.domain.po.clerksalary.Salarystandard;

public class DereplicationListUtil {
	// 去重复
	public static List<Salarystandard> dereplication(
			List<Salarystandard> source, List<Salarystandard> target) {
		if (target.size() == 0) {
			target.addAll(source);
		} else {
			for (Salarystandard salarystandard : source) {
				boolean flag = false;
				for (Salarystandard salarystandard1 : target) {
					if (salarystandard.getSalarystandardid().equals(
							salarystandard1.getSalarystandardid())) {
						flag = true;
					}
				}
				if (!flag) {
					target.add(salarystandard);
				}
			}
		}
		return target;
	}
}
